home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / libraries / dylan / char.dylan < prev    next >
Encoding:
Text File  |  1995-03-15  |  1.5 KB  |  47 lines  |  [TEXT/ttxt]

  1. module: Dylan
  2. rcs-header: $Header: char.dylan,v 1.4 94/11/06 20:09:16 rgs Exp $
  3.  
  4. //======================================================================
  5. //
  6. // Copyright (c) 1994  Carnegie Mellon University
  7. // All rights reserved.
  8. // 
  9. // Use and copying of this software and preparation of derivative
  10. // works based on this software are permitted, including commercial
  11. // use, provided that the following conditions are observed:
  12. // 
  13. // 1. This copyright notice must be retained in full on any copies
  14. //    and on appropriate parts of any derivative works.
  15. // 2. Documentation (paper or online) accompanying any system that
  16. //    incorporates this software, or any part of it, must acknowledge
  17. //    the contribution of the Gwydion Project at Carnegie Mellon
  18. //    University.
  19. // 
  20. // This software is made available "as is".  Neither the authors nor
  21. // Carnegie Mellon University make any warranty about the software,
  22. // its performance, or its conformity to any specification.
  23. // 
  24. // Bug reports, questions, comments, and suggestions should be sent by
  25. // E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  26. //
  27. //======================================================================
  28. //
  29. // This file contains the support for characters that isn't built in.
  30. //
  31.  
  32. define method as-uppercase (c :: <character>)
  33.   if ('a' <= c & c <= 'z')
  34.     as(<character>, as(<integer>, c) - 32);
  35.   else
  36.     c;
  37.   end;
  38. end;
  39.  
  40. define method as-lowercase (c :: <character>)
  41.   if ('A' <= c & c <= 'Z')
  42.     as(<character>, as(<integer>, c) + 32);
  43.   else
  44.     c;
  45.   end;
  46. end;
  47.